package idea.components;

import com.intellij.openapi.ui.ComboBox;
import net.miginfocom.swing.MigLayout;
import swingExtensions.demo.FrameDemo;

import javax.swing.*;

public class ComponentsDemo {

    private ComboBox comboBox;

    protected JPanel createContentPanel() {
        JPanel panel = new JPanel(new MigLayout("fill, wrap 2", "[]rel[grow,fill]", ""));

        comboBox = new ComboBox();
        panel.add(new JLabel("ComboBox"));
        panel.add(comboBox);

        return panel;
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            ComponentsDemo demo = new ComponentsDemo();
            FrameDemo frameDemo = new FrameDemo(ComponentsDemo.class.toString());
            frameDemo.setContentPane(demo.createContentPanel());
            frameDemo.setVisible(true);
        });
    }
}
